package triggerhelper.tabs;

import java.awt.Color;
import javax.swing.*;
import triggerhelper.helperClasses.*;

public class VariablesTab extends javax.swing.JPanel{

    /** Creates new form Variables */
    public VariablesTab() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pVariables = new javax.swing.JPanel();
        cbVars = new javax.swing.JComboBox();
        fVarName = new javax.swing.JTextField();
        vars_lVarName = new javax.swing.JLabel();
        vars_literate = new javax.swing.JLabel();
        fIterate = new javax.swing.JTextField();
        jSeparator1 = new javax.swing.JSeparator();
        vars_lVarList = new javax.swing.JLabel();
        TabPane = new javax.swing.JTabbedPane();
        vars_pWord = new javax.swing.JPanel();
        fVarInstance = new javax.swing.JTextField();
        bSubmitInstance = new javax.swing.JButton();
        vars_lVarInstance = new javax.swing.JLabel();
        bChange = new javax.swing.JButton();
        vars_pNumber = new javax.swing.JPanel();
        vars_lStartValue = new javax.swing.JLabel();
        fStartValue = new javax.swing.JTextField();
        fEndValue = new javax.swing.JTextField();
        vars_lEndValue = new javax.swing.JLabel();
        cbOptions = new javax.swing.JComboBox();
        vars_lOptions = new javax.swing.JLabel();
        bSubmitOptions = new javax.swing.JButton();
        bHelp = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        listInstance = new triggerhelper.tabs.DList();

        pVariables.setBackground(new java.awt.Color(255, 223, 223));

        cbVars.setBackground(new Color(255, 255, 255));
        cbVars.setEnabled(false);

        fVarName.setText("<var name>");
        fVarName.setEnabled(false);

        vars_lVarName.setFont(new java.awt.Font("Tahoma", 1, 12));
        vars_lVarName.setForeground(new java.awt.Color(102, 19, 19));
        vars_lVarName.setText("Variable name");

        vars_literate.setFont(new java.awt.Font("Tahoma", 0, 12));
        vars_literate.setForeground(new java.awt.Color(102, 19, 19));
        vars_literate.setText("Iterate value");

        fIterate.setText("<number>");
        fIterate.setEnabled(false);
        fIterate.setNextFocusableComponent(cbOptions);

        jSeparator1.setBackground(new java.awt.Color(255, 223, 223));
        jSeparator1.setForeground(new java.awt.Color(102, 19, 19));
        jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);

        vars_lVarList.setFont(new java.awt.Font("Tahoma", 0, 12));
        vars_lVarList.setForeground(new java.awt.Color(102, 19, 19));
        vars_lVarList.setText("Variable list :");

        TabPane.setForeground(new java.awt.Color(102, 19, 19));
        TabPane.setEnabled(false);
        TabPane.setFocusable(false);

        vars_pWord.setBackground(new java.awt.Color(255, 223, 223));

        fVarInstance.setText("<instance>");
        fVarInstance.setEnabled(false);
        fVarInstance.setNextFocusableComponent(fIterate);

        bSubmitInstance.setText("Submit");
        bSubmitInstance.setEnabled(false);
        bSubmitInstance.setFocusable(false);

        vars_lVarInstance.setFont(new java.awt.Font("Tahoma", 0, 12));
        vars_lVarInstance.setForeground(new java.awt.Color(102, 19, 19));
        vars_lVarInstance.setText("Variable Instance");

        bChange.setText("Change");
        bChange.setEnabled(false);
        bChange.setFocusable(false);

        javax.swing.GroupLayout vars_pWordLayout = new javax.swing.GroupLayout(vars_pWord);
        vars_pWord.setLayout(vars_pWordLayout);
        vars_pWordLayout.setHorizontalGroup(
            vars_pWordLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(vars_pWordLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(vars_pWordLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(vars_pWordLayout.createSequentialGroup()
                        .addComponent(bSubmitInstance)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(bChange, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(vars_pWordLayout.createSequentialGroup()
                        .addComponent(vars_lVarInstance, javax.swing.GroupLayout.DEFAULT_SIZE, 94, Short.MAX_VALUE)
                        .addGap(56, 56, 56))
                    .addGroup(vars_pWordLayout.createSequentialGroup()
                        .addComponent(fVarInstance, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
        );
        vars_pWordLayout.setVerticalGroup(
            vars_pWordLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(vars_pWordLayout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addComponent(vars_lVarInstance)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(fVarInstance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(vars_pWordLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(bChange)
                    .addComponent(bSubmitInstance))
                .addGap(13, 13, 13))
        );

        TabPane.addTab("Word", vars_pWord);

        vars_pNumber.setBackground(new java.awt.Color(255, 223, 223));

        vars_lStartValue.setFont(new java.awt.Font("Tahoma", 0, 12));
        vars_lStartValue.setForeground(new java.awt.Color(102, 19, 19));
        vars_lStartValue.setText("Start value :");

        fStartValue.setText("<start>");
        fStartValue.setEnabled(false);

        fEndValue.setText("<end>");
        fEndValue.setEnabled(false);

        vars_lEndValue.setFont(new java.awt.Font("Tahoma", 0, 12));
        vars_lEndValue.setForeground(new java.awt.Color(102, 19, 19));
        vars_lEndValue.setText("End value :");

        javax.swing.GroupLayout vars_pNumberLayout = new javax.swing.GroupLayout(vars_pNumber);
        vars_pNumber.setLayout(vars_pNumberLayout);
        vars_pNumberLayout.setHorizontalGroup(
            vars_pNumberLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(vars_pNumberLayout.createSequentialGroup()
                .addGroup(vars_pNumberLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(vars_pNumberLayout.createSequentialGroup()
                        .addGap(16, 16, 16)
                        .addComponent(vars_lEndValue)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(fEndValue, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, vars_pNumberLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(vars_lStartValue)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(fStartValue, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)))
                .addContainerGap())
        );
        vars_pNumberLayout.setVerticalGroup(
            vars_pNumberLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(vars_pNumberLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(vars_pNumberLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(vars_lStartValue)
                    .addComponent(fStartValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(vars_pNumberLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fEndValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(vars_lEndValue))
                .addContainerGap(13, Short.MAX_VALUE))
        );

        TabPane.addTab("Number", vars_pNumber);

        Object[] items = { new ComboItem("New Variable"), new ComboItem("Save Var"), new ComboItem("Delete Var"), new ComboItem("Delete Instance") };
        cbOptions.addActionListener(new ComboListener(cbOptions));
        cbOptions.setModel(new javax.swing.DefaultComboBoxModel(items));
        cbOptions.setRenderer(new ComboRenderer());

        vars_lOptions.setFont(new java.awt.Font("Tahoma", 0, 12));
        vars_lOptions.setForeground(new java.awt.Color(102, 19, 19));
        vars_lOptions.setText("Options :");

        bSubmitOptions.setText("Submit");

        bHelp.setText("Help");
        bHelp.setFocusable(false);

        listInstance.setModel(new javax.swing.DefaultListModel());
        listInstance.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        listInstance.setEnabled(false);
        jScrollPane1.setViewportView(listInstance);

        javax.swing.GroupLayout pVariablesLayout = new javax.swing.GroupLayout(pVariables);
        pVariables.setLayout(pVariablesLayout);
        pVariablesLayout.setHorizontalGroup(
            pVariablesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pVariablesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pVariablesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(vars_lVarName)
                    .addComponent(TabPane, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                    .addComponent(fVarName)
                    .addComponent(vars_literate)
                    .addComponent(fIterate))
                .addGap(20, 20, 20)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 4, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pVariablesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pVariablesLayout.createSequentialGroup()
                        .addComponent(bHelp)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)
                        .addComponent(bSubmitOptions))
                    .addGroup(pVariablesLayout.createSequentialGroup()
                        .addComponent(vars_lOptions)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cbOptions, 0, 110, Short.MAX_VALUE))
                    .addGroup(pVariablesLayout.createSequentialGroup()
                        .addComponent(vars_lVarList)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbVars, 0, 98, Short.MAX_VALUE))
                    .addGroup(pVariablesLayout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pVariablesLayout.setVerticalGroup(
            pVariablesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pVariablesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pVariablesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 211, Short.MAX_VALUE)
                    .addGroup(pVariablesLayout.createSequentialGroup()
                        .addGroup(pVariablesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(vars_lVarList)
                            .addComponent(cbVars, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(1, 1, 1)
                        .addGroup(pVariablesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(vars_lOptions)
                            .addComponent(cbOptions, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(pVariablesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(bHelp)
                            .addComponent(bSubmitOptions)))
                    .addGroup(pVariablesLayout.createSequentialGroup()
                        .addComponent(vars_lVarName)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(fVarName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(7, 7, 7)
                        .addComponent(TabPane, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(vars_literate)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(fIterate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(10, 10, 10))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pVariables, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pVariables, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents

    //class variable getters
    public JButton getBhelp(){
        return bHelp;
    }public JButton getbSubmitInstance() {
        return bSubmitInstance;
    }public JComboBox getCbOptions() {
        return cbOptions;
    }public JComboBox getCbVars() {
        return cbVars;
    }public JTextField getfEndValue() {
        return fEndValue;
    }public JTextField getfIterate() {
        return fIterate;
    }public JTextField getfStartValue() {
        return fStartValue;
    }public JTextField getfVarInstance() {
        return fVarInstance;
    }public JTextField getfVarName() {
        return fVarName;
    }public DList getListInstance() {
        return listInstance;
    }public JButton getbSubmitOptions() {
        return bSubmitOptions;
    }public JTabbedPane getTabPane() {
        return TabPane;
    }public JPanel getpVariables() {
        return pVariables;
    }public JButton getbChange() {
        return bChange;
    }


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTabbedPane TabPane;
    private javax.swing.JButton bChange;
    private javax.swing.JButton bHelp;
    private javax.swing.JButton bSubmitInstance;
    private javax.swing.JButton bSubmitOptions;
    private javax.swing.JComboBox cbOptions;
    private javax.swing.JComboBox cbVars;
    private javax.swing.JTextField fEndValue;
    private javax.swing.JTextField fIterate;
    private javax.swing.JTextField fStartValue;
    private javax.swing.JTextField fVarInstance;
    private javax.swing.JTextField fVarName;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSeparator jSeparator1;
    private triggerhelper.tabs.DList listInstance;
    private javax.swing.JPanel pVariables;
    private javax.swing.JLabel vars_lEndValue;
    private javax.swing.JLabel vars_lOptions;
    private javax.swing.JLabel vars_lStartValue;
    private javax.swing.JLabel vars_lVarInstance;
    private javax.swing.JLabel vars_lVarList;
    private javax.swing.JLabel vars_lVarName;
    private javax.swing.JLabel vars_literate;
    private javax.swing.JPanel vars_pNumber;
    private javax.swing.JPanel vars_pWord;
    // End of variables declaration//GEN-END:variables

}
